#!/bin/bash -e
PID=`ps -ef|grep shorturl-1.0.jar |grep -v grep|awk '{print $2}' `
if [ -n "$PID" ]; then
     kill -9 $PID
     echo "结束$PID进程"
fi
nohup java -jar /app/shorturl/shorturl-1.0.jar > shorturl.log 2>&1 &
echo "部署完毕!"